import { CommunityItem } from "./models";
import req from "/@/api/req";

export const Api = {
  communityDefPage: "mall-ums/api/v1/community-definition/page",
  communityDef: "mall-ums/api/v1/community-definition",
  communityDefList: "mall-ums/api/v1/community-definition/list",

  frontWarehousePage: "mall-ums/api/v1/front-warehouse/page",
  frontWarehouse: "mall-ums/api/v1/front-warehouse",

  deliveryPersonPage: "mall-ums/api/v1/delivery-personnel/page",
  deliveryPerson: "mall-ums/api/v1/delivery-personnel",
};

export function getCommunityDefList(regionId?: number) {
  return req.commonGet<CommunityItem[]>(Api.communityDefList, { adminRegionId: regionId || "" });
}
